home *** CD-ROM | disk | FTP | other *** search
/ The Atari Compendium / The Atari Compendium (Toad Computers) (1994).iso / files / prgtools / mint / gcc / gcc261c.zoo / objects / RetainingNotifier.h < prev    next >
Encoding:
C/C++ Source or Header  |  1994-11-18  |  1.8 KB  |  58 lines

  1. /* Interface for reference-counted invalidation notifer object
  2.    Copyright (C) 1993,1994 Free Software Foundation, Inc.
  3.    
  4.    Written by:  R. Andrew McCallum <mccallum@gnu.ai.mit.edu>
  5.    Date: July 1994
  6.    
  7.    This file is part of the GNU Objective C Class Library.
  8.  
  9.    This library is free software; you can redistribute it and/or
  10.    modify it under the terms of the GNU Library General Public
  11.    License as published by the Free Software Foundation; either
  12.    version 2 of the License, or (at your option) any later version.
  13.    
  14.    This library is distributed in the hope that it will be useful,
  15.    but WITHOUT ANY WARRANTY; without even the implied warranty of
  16.    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  17.    Library General Public License for more details.
  18.    
  19.    You should have received a copy of the GNU Library General Public
  20.    License along with this library; if not, write to the Free
  21.    Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  22.    */ 
  23.  
  24. /* Reference Counted object with invalidation notification 
  25.    This object is just temporary.  Eventually, we should separate 
  26.    reference counting functionality from notification functionality */
  27.  
  28. #ifndef __RetainingNotifier_h
  29. #define __RetainingNotifier_h
  30.  
  31. #include <objects/stdobjects.h>
  32. #include <objects/Lock.h>
  33. #include <objects/InvalidationListening.h>
  34. #include <objects/Retaining.h>
  35. #include <objc/List.h>
  36.  
  37. @interface RetainingNotifier : Object <Retaining>
  38. {
  39.   Lock *refGate;
  40.   List *notificationList;
  41.   BOOL isValid;
  42.   int retain_count;
  43. }
  44.  
  45. + initialize;
  46. - init;
  47. - free;
  48. - (unsigned) retainCount;
  49. - registerForInvalidationNotification:  (id <InvalidationListening>)anObject;
  50. - unregisterForInvalidationNotification: (id <InvalidationListening>)anObject;
  51. - (BOOL) isValid;
  52. - invalidate;
  53. - copy;
  54.  
  55. @end
  56.  
  57. #endif /* __RetainingNotifier_h */
  58.